#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<unordered_map>

using namespace std;

vector<string> findRepeatedDnaSequences(string s) {
    int n = s.size();
    vector<string> res;
    unordered_map<string, int> cnt;
    for (int i = 0; i <= n - 10; i++)
    {
        string str = s.substr(i, 10);
        if (++cnt[str] == 2)
        {
            res.push_back(str);
        }
    }
    return res;
}